import os
import yaml

ENVIRONMENT = os.getenv("ENVIRONMENT", "").lower() or "dev"

with open("./config.yaml") as file:
    data: dict[str, str] = yaml.load(file.read(), Loader=yaml.FullLoader)

# ElasticSearch
ES_HOST = data.get("ES_HOST", "http://36.103.203.10:31391")
ES_USER = data.get("ES_USER", "elastic")
ES_PASSWORD = data.get("ES_PASSWORD", "infini_truth_ai")
ES_INDEX = data.get("ES_INDEX", "rag_zhaojin_20241119")

# QueryProcessor
EMBEDDING_API_BASE = data.get("EMBEDDING_API_BASE", "https://api.siliconflow.cn/v1")
EMBEDDING_API_KEY = data.get("EMBEDDING_API_KEY", "sk-efijzrusihqhkkvxjcrzrzmmswylqkrpesmjjbweqlbiceso")
EMBEDDING_API_MODEL = data.get("EMBEDDING_API_MODEL", "Pro/BAAI/bge-m3")

RERANKER_API_BASE = data.get("RERANKER_API_BASE", "https://api.siliconflow.cn/v1")
RERANKER_API_KEY = data.get("RERANKER_API_KEY", "sk-efijzrusihqhkkvxjcrzrzmmswylqkrpesmjjbweqlbiceso")
RERANKER_API_MODEL = data.get("RERANKER_API_MODEL", "BAAI/bge-reranker-v2-m3")